﻿// IRepository/ISysOrgUserManagementRepository.cs
using Entity;
using System.Threading.Tasks;


namespace XingWeiDaWMSProject.IRepository
{
    /// <summary>
    /// 系统组织用户管理仓储接口
    /// </summary>
    public interface ISysOrgUserManagementRepository
    {
        /// <summary>根据账号获取用户（未删除的）</summary>
        Task<SysOrgUserManagement> GetByUserAccountAsync(string userAccount);

        /// <summary>更新用户信息</summary>
        Task<bool> UpdateAsync(SysOrgUserManagement user);

        /// <summary>验证账号密码（未删除且状态正常）</summary>
        Task<bool> VerifyPasswordAsync(string userAccount, string password);

        /// <summary>修改密码（包含更新人信息）</summary>
        Task<bool> ChangePasswordAsync(string userAccount, string encryptedNewPassword, string updateBy, DateTime updateTime);
        Task<string> GetPasswordByAccountAsync(string userAccount);
        // 新增：查询所有未删除的用户
        Task<List<SysOrgUserManagement>> GetAllAsync();
        // 新增：根据角色名称查询用户
        Task<List<SysOrgUserManagement>> GetByRoleNameAsync(string roleName);
        Task<SysOrgUserManagement> GetByIdAsync(int userId);
        Task<Dictionary<string, string>> GetUserNamesByIdsAsync(List<string> userIds);
    }
}